package com.harlov.robanuka.support;

import org.anddev.andengine.entity.Entity;
import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.sprite.AnimatedSprite;
import org.anddev.andengine.entity.sprite.Sprite;
import org.anddev.andengine.extension.physics.box2d.PhysicsWorld;
import org.anddev.andengine.opengl.texture.region.TextureRegion;
import org.anddev.andengine.opengl.texture.region.TiledTextureRegion;

import com.badlogic.gdx.physics.box2d.Body;

public abstract class gameobject extends Entity{
	
	 protected AnimatedSprite mSprite;
	 public PhysicsWorld mWorld;
	 public Body body ;
	
	public gameobject(final int posX, final int posY, final TiledTextureRegion region, PhysicsWorld World ,Scene scene) {
		
	    mSprite = new AnimatedSprite(posX , posY, region);
	    mWorld = World;
	    attachChild(mSprite);
	    attachTo(scene);
	    mSprite.animate(200);
	  }
	
	protected AnimatedSprite getSprite() {
	    return mSprite;
	  }
	
	 public static enum Type {
		    player,
		    laser_shot
		  }
	 
	 public abstract void attachTo(Scene scene);
}
